﻿var SelectedModule = null;

$(function () {
    //    $("#" + lastSelectedModule).removeClass("select");
    //    $("#Module_" + moduleCode).addClass("current");
    $("#logout").live("click", function () {
        var url;
        url = $Url.resolve("~/Account/LogOn");
        window.location.href = url;
    });
});

function selectSubMenu(targetController, targetAction, moduleCode) {
    var url;


    //    $("#Module_" + moduleCode).removeClass("select").addClass("current");
    //    if (SelectedModule != null) {
    //        $("#Module_" + SelectedModule).removeClass("select").addClass("current");
    //    }

    url = $Url.resolve("~/" + targetController);
    if (targetAction != "") {
        url = $Url.resolve("~/" + targetController + "/" + targetAction);
    }

    //    lastSelectedModule = "Module_" + moduleCode;
    window.location.href = url;

}